import os, os.path
import re
import sys
import glob

def Build_lib_HumbleGL(env):
	humbleGL_sources = glob.glob('../../src/libHumbleGL/*.cpp')
	# todo
	if env ['PLATFORM'] == "darwin" and isNativeOnMac: 
		#humbleGL_sources_platform = glob.glob('../../src/libHumbleGL/OSX/*.cpp')	
		print "Native Mac OSX  not Supported yet."
		exit(1)
	elif env['OS'] in ("Darwin", "Linux"):
		# GLX based Renderers.
		humbleGL_sources_platform = glob.glob('../../src/libHumbleGL/glx/*.cpp')
	elif env['OS'] in ("Windows"):
		# WGL based Renderers.	
		humbleGL_sources_platform = glob.glob('../../src/libHumbleGL/win32/*.cpp')	
	print "Building Humble OpenGL Video Library"
	temp = env.SharedLibrary(target = 'out/libs/HumbleVideoGL', source = [humbleGL_sources,humbleGL_sources_platform])
	env.AlwaysBuild(temp)

